package com.kefu.call.vo;

import org.apache.commons.lang3.StringUtils;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.kefu.common.vo.AbstractSearchVo;
import com.kefu.call.model.CallInnumber;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @author CodeGenerator
 * @date 2022/07/24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "呼入号码")
public class CallInnumberSearchVo extends AbstractSearchVo {

    @ApiModelProperty(value = "呼入号码")
    private String callnumber;
    @ApiModelProperty(value = "公司id")
    private String company;
    @ApiModelProperty(value = "说明")
    private String remarks;

	 @Override
    public  LambdaQueryWrapper<CallInnumber> lambdaQuery(){
    	LambdaQueryWrapper<CallInnumber> wrapper=Wrappers.<CallInnumber>lambdaQuery();
	    wrapper.like(StringUtils.isNotBlank(callnumber), CallInnumber::getCallnumber, callnumber);//呼入号码
	    wrapper.eq(StringUtils.isNotBlank(company), CallInnumber::getCompany, company);//公司id
	    wrapper.like(StringUtils.isNotBlank(remarks), CallInnumber::getRemarks, remarks);//说明
	    
    	return wrapper;
	}
}